package com.zjty.util;

import com.zjty.pojo.Page;

/*
 * 分页工具
 */
public class PageUtil {
	/*
	 * 总页数
	 */
	public static final int totalPage(int count) {
		return (count % Page.pageSize == 0) ? count / Page.pageSize : count / Page.pageSize + 1;
	}

	/*
	 * 起始下标
	 */
	public static final int pageStart(int pageNum) {
		return Page.pageSize * (pageNum - 1);
	}
}
